import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView/HomeViev.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/home',
    meta: {
      keepAlive: false,
      show: true
    }
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView,
    meta: {
      keepAlive: false,
      show: true
    }
  },
  {
    path: '/Shopping',
    name: 'Shopping',
    component: () => import( /* webpackChunkName: "about" */ '@/views/ShoppingCentre/ShoppingCentre.vue'),
    meta: {
      keepAlive: false,
      show: true

    }
  },
  {
    path: '/live',
    name: 'live',
    component: () => import( /* webpackChunkName: "about" */ '@/views/LiveBroadcast/LiveBroadcast.vue'),
    meta: {
      keepAlive: false,
      show: true

    }
  },
  {
    path: '/my',
    name: 'my',
    component: () => import( /* webpackChunkName: "about" */ '@/views/MyViev/MyViev.vue'),
    meta: {
      keepAlive: false,
      show: true

    }
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/HomeDetail.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/taxonomic',
    name: 'taxonomic',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/HomeTaxonomic.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( /* webpackChunkName: "about" */ '@/views/MyViev/LoginView.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/register',
    name: 'register',
    component: () => import( /* webpackChunkName: "about" */ '@/views/MyViev/RegisterView.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/search',
    name: 'search',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/HomeSearch.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/goods',
    name: 'goods',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/HomeSearchList.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/merchandise',
    name: 'merchandise',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/HomeProductDetails.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/comments',
    name: 'comments',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/CommentView.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/ShoppingCart.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/payment',
    name: 'payment',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/OrderPayment.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/livelroadcast',
    name: 'livelroadcast',
    component: () => import( /* webpackChunkName: "about" */ '@/views/LiveBroadcast/LiveCast.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/comment',
    name: 'comment',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/CommentListView.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/address',
    name: 'address',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/newAddress.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/adds',
    name: 'adds',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/AddressView.vue'),
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/dingdan',
    name: 'dingdan',
    component: () => import( /* webpackChunkName: "about" */ '@/views/HomeView/MyOrder.vue'),
    meta: {
      keepAlive: true
    }
  }

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
